<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('用户信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <!--<form class="form-horizontal m" id="form-data-userdata" name="form-data-userdatas">
        <div class="form-group">
            <label class="col-sm-3 control-label">用户名：</label>
            <div class="col-sm-8">
                <h1 th:text="${userdata.loginName}"></h1>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">email：</label>
            <h1 th:text="${userdata.email}"></h1>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">手机号码：</label>
            <h1 th:text="${userdata.phonenumber}"></h1>
        </div>
    </form>-->
    <div class="col-sm-12 select-table table-striped">
        <table id="bootstrap-table"></table>
        <input id="toolbarss" th:value="${id}" hidden>
    </div>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    var f = $('#toolbarss').val();
    var prefix = ctx + "system/data"
    $(function() {
        var options = {
            url: prefix + "/userdata/"+f,

            modalName: "数据信息",
            columns: [
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'loginName',
                    title: '用户姓名'
                },
                {
                    field: 'email',
                    title: '邮箱'
                },
                {
                    field: 'phonenumber',
                    title: '手机号码'
                },
                {
                    field: 'sex',
                    title: '性别',
                    formatter: function (value) {
                        if (value == '0' ){
                            return value='男'
                        }else if (value =='1'){
                            return value='女'
                        }
                    }
                },
                {
                    field: 'dept.deptName',
                    title: '部门'
                }
            ]};

        $.table.init(options);

    });
</script>
</body>
</html>
